<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/rp/common/taglib.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <base href="<%=basePath%>">
    
    <title>${ webpageTitle }</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	
	<script src="rp/scripts/boot.js" type="text/javascript"></script>
	
	<style type="text/css">
	   	
    </style>
	
  </head>
  
  <body class="body-fit">
  	
  	<div style="width: 100%; height: 100%;">
    	
    	<div id="grid" class="mini-datagrid" style="width: 100%; height: 300px;"
	    	url="rp/system/authMng/getAuths" idField="id" allowResize="false" pageSize="20">
	    	<div property="columns">
		        <div name="name" field="name" width="70" headerAlign="center">
		        	权限名称
		        </div>
		        <div name="code" field="code" headerAlign="center">
		        	权限代码
		        </div>
		    </div>
	    </div>
	  	
    </div>
    
    <div class="mini-toolbar" style="width: 100%; padding: 5px; position: fixed; bottom: 0px;" borderStyle="border:0;">
        <a class="mini-button" style="width:60px;" onclick="onOk()">确定</a>
        
        <a class="mini-button" style="width:60px;" onclick="onCancel()">取消</a>
    </div>
  	
	<script type="text/javascript">
		var grid;
	
		$(function(){
			grid = mini.get("grid");
			grid.load();
		});
		
		//获取选中的数据
		function getSelectData() {
			var row = grid.getSelected();
	        return row;
	    }
		
		
		//////////////////////////
		function closeWindow(action) {
	        if (window.CloseOwnerWindow) return window.CloseOwnerWindow(action);
	        else window.close();
	    }

	    function onOk() {
	    	closeWindow("ok");
	    }
	    function onCancel() {
	    	closeWindow("cancel");
	    }
	</script>
  </body>
</html>
